import store from '../store'

export function hasPermission(permission) {
  let myPermissions = store.getters.btns;
  // 判断权限
  let enable = myPermissions.filter(p => {
    if(p.attributes.code === permission)
      return true;
    else
      return false
  });
  return enable&&enable.length > 0;
}
